import request from '@/utils/request'
//添加课程目标
export const addCourseObjectives = (data) => {
    return request.post('/exam/T_exam_target/add', data)
}

//查询所有课程目标
export const getAllCourseObjectives = (id) => {
    return request.get(`/exam/T_exam_target/list/${id}`, id);
};

//删除课程目标
export const deleteCourseObjectives = (id) => {
    return request.delete(`/exam/T_exam_targe/delete/${id}`);
};

//更新课程目标
export const updateCourseObjectives = (data) => {
    return request.put(`/exam/T_exam_targe/update/${data.id}`, data)
}

//通过id来查询课程目标
export const getIdCourseObject = (id) => {
    return request.get(`/exam/T_exam_target/getone/${id}`)
}

//教学大纲路径返回数据
export const getCourseSyllabus = (data) => {
    return request.get(`/exam/T_subject/uploadDocumen?path=${data}`, data)
}

//教学大纲根据路径返回数据
export const getSyllabusData = (data) => {
    return request.get(`/exam/T_subject/getDocumen?path=${data}`, {
        responseType: 'blob' // 设置响应类型为 Blob
    })
}

//获取教学大纲路径
export const getSyllabusPath = (id) => {
    return request.get(`/exam/T_subject/Get_T_user_a_c_s_and_Path?t_user_and_a_c_s_id=${id}`)
}